home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 2.3 KB | 84 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: RbbrBand.h
- // Release Version: $ ODF 1 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef RBBRBAND_H
- #define RBBRBAND_H
-
- // ----- Framework Includes -----
-
- #ifndef FWTRACKR_H
- #include "FWTrackr.h"
- #endif
-
- // ----- Graphic Includes -----
-
- #ifndef FWRECSHP_H
- #include "FWRecShp.h"
- #endif
-
- //========================================================================================
- // Forward Class Declarations
- //========================================================================================
-
- class CBitmapFrame;
-
- //========================================================================================
- // class CRectRubberBand
- //========================================================================================
-
- class CRectRubberBand : public FW_CTracker
- {
- //-----------------------------------------------------------------------------------------
- // Constructors/Destructor
- //
- public:
- CRectRubberBand(Environment* ev,
- CBitmapFrame* frame,
- ODFacet* facet,
- const FW_CRect& maxRect,
- const FW_CPoint& zoomRatio);
- virtual ~CRectRubberBand();
-
- //-----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual FW_CPoint BeginTracking(Environment* ev,
- const FW_CPoint& anchorPoint);
- virtual FW_CPoint ContinueTracking(Environment* ev,
- const FW_CPoint& anchorPoint,
- const FW_CPoint& previousPoint,
- const FW_CPoint& currentPoint);
- virtual FW_Boolean EndTracking(Environment* ev,
- const FW_CPoint& anchorPoint,
- const FW_CPoint& lastPoint);
-
- //-----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void GetRect(FW_CRect& rect)
- {fRectShape.GetRectangle(rect);}
- FW_CPoint AlignOnPixel(const FW_CPoint& location);
-
- void DrawRubberBand(Environment* ev);
-
- //-----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- FW_CRectShape fRectShape;
- FW_CRect fMaxRect;
- FW_CPoint fZoomRatio;
- CBitmapFrame* fBitmapFrame;
- };
-
- #endif